package com.hex.ds.hdrs.period.task.dao;

import com.hex.bigdata.hbda.base.BaseDao;
import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.period.task.po.MutexPool;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class MutexPoolDao extends BaseDao {

    public List<MutexPool> queryListByPage(MutexPool mutexPool, Page page) {
        return this.selectPage(MutexPool.class, "com.hex.ds.hdrs.period.task.dao.MutexPoolDao.query", page, mutexPool);
    }

    public void insert(MutexPool mutexPool) {
        this.insert("com.hex.ds.hdrs.period.task.dao.MutexPoolDao.insert", mutexPool);
    }

    public void delByGroupCode(String groupCode) {
        this.delete("com.hex.ds.hdrs.period.task.dao.MutexPoolDao.delByGroupCode", groupCode);
    }

    public List<MutexPool> queryList(MutexPool mutexPool) {
        return this.selectList(MutexPool.class, "com.hex.ds.hdrs.period.task.dao.MutexPoolDao.query", mutexPool);
    }

    public int delMutexPool(String pkId) {
        return this.delete("com.hex.ds.hdrs.period.task.dao.MutexPoolDao.delMutexPool", pkId);
    }

    public MutexPool queryOne(MutexPool mutexPool) {
        return this.selectOne(MutexPool.class, "com.hex.ds.hdrs.period.task.dao.MutexPoolDao.query", mutexPool);
    }

    public int update(MutexPool mutexPool) {
        return this.update("com.hex.ds.hdrs.period.task.dao.MutexPoolDao.update", mutexPool);
    }
}